package common.server.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * rest 请求日志统一打印
 * @author Administrator
 * @version [版本号, 2017/11/15 0015]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
@Aspect
@Component
@Order(-7)
public class RestLogAspect {

    @Pointcut("@within(common.server.aop.AopSign)")
    public void restLog(){

    }

    @Before("restLog()")
    public void doBefore(JoinPoint joinPoint) throws Throwable {
        // RestLogAspectHelper.I.doBefore(joinPoint);
    }

    @AfterReturning(returning = "ret", pointcut = "restLog()")
    public void doAfterReturning(JoinPoint joinPoint,Object ret) throws Throwable {
        // RestLogAspectHelper.I.doAfterReturning(joinPoint,ret);
    }
}
